﻿using System;
using UnityEngine;

namespace Studio
{
	// Token: 0x02000475 RID: 1141
	public static class AnimeCommand
	{
		// Token: 0x02000476 RID: 1142
		public class SpeedCommand : ICommand
		{
			// Token: 0x06001C4E RID: 7246 RVA: 0x000B6C14 File Offset: 0x000B4E14
			public SpeedCommand(int[] _arrayKey, float _speed, float[] _oldSpeed)
			{
				this.arrayKey = _arrayKey;
				this.speed = _speed;
				this.oldSpeed = _oldSpeed;
			}

			// Token: 0x06001C4F RID: 7247 RVA: 0x000B6C34 File Offset: 0x000B4E34
			public void Do()
			{
				for (int i = 0; i < this.arrayKey.Length; i++)
				{
					ObjectCtrlInfo ctrlInfo = Studio.GetCtrlInfo(this.arrayKey[i]);
					if (ctrlInfo != null)
					{
						ctrlInfo.animeSpeed = this.speed;
					}
				}
			}

			// Token: 0x06001C50 RID: 7248 RVA: 0x000B6C80 File Offset: 0x000B4E80
			public void Redo()
			{
				this.Do();
			}

			// Token: 0x06001C51 RID: 7249 RVA: 0x000B6C88 File Offset: 0x000B4E88
			public void Undo()
			{
				for (int i = 0; i < this.arrayKey.Length; i++)
				{
					ObjectCtrlInfo ctrlInfo = Studio.GetCtrlInfo(this.arrayKey[i]);
					if (ctrlInfo != null)
					{
						ctrlInfo.animeSpeed = this.oldSpeed[i];
					}
				}
			}

			// Token: 0x04001F63 RID: 8035
			private int[] arrayKey;

			// Token: 0x04001F64 RID: 8036
			private float speed;

			// Token: 0x04001F65 RID: 8037
			private float[] oldSpeed;
		}

		// Token: 0x02000477 RID: 1143
		public class PatternCommand : ICommand
		{
			// Token: 0x06001C52 RID: 7250 RVA: 0x000B6CD8 File Offset: 0x000B4ED8
			public PatternCommand(int[] _arrayKey, Vector2 _value, Vector2[] _oldvalue)
			{
				this.arrayKey = _arrayKey;
				this.value = _value;
				this.oldvalue = _oldvalue;
			}

			// Token: 0x06001C53 RID: 7251 RVA: 0x000B6CF8 File Offset: 0x000B4EF8
			public void Do()
			{
				for (int i = 0; i < this.arrayKey.Length; i++)
				{
					OCIChar ocichar = Studio.GetCtrlInfo(this.arrayKey[i]) as OCIChar;
					if (ocichar != null)
					{
						ocichar.animePattern1 = this.value.x;
						ocichar.animePattern2 = this.value.y;
					}
				}
			}

			// Token: 0x06001C54 RID: 7252 RVA: 0x000B6D60 File Offset: 0x000B4F60
			public void Redo()
			{
				this.Do();
			}

			// Token: 0x06001C55 RID: 7253 RVA: 0x000B6D68 File Offset: 0x000B4F68
			public void Undo()
			{
				for (int i = 0; i < this.arrayKey.Length; i++)
				{
					OCIChar ocichar = Studio.GetCtrlInfo(this.arrayKey[i]) as OCIChar;
					if (ocichar != null)
					{
						ocichar.animePattern1 = this.oldvalue[i].x;
						ocichar.animePattern2 = this.oldvalue[i].y;
					}
				}
			}

			// Token: 0x04001F66 RID: 8038
			private int[] arrayKey;

			// Token: 0x04001F67 RID: 8039
			private Vector2 value;

			// Token: 0x04001F68 RID: 8040
			private Vector2[] oldvalue;
		}

		// Token: 0x02000478 RID: 1144
		public class OptionParamCommand : ICommand
		{
			// Token: 0x06001C56 RID: 7254 RVA: 0x000B6DDC File Offset: 0x000B4FDC
			public OptionParamCommand(int[] _arrayKey, float _value, float[] _oldvalue, int _kind)
			{
				this.arrayKey = _arrayKey;
				this.value = _value;
				this.oldvalue = _oldvalue;
				this.kind = _kind;
			}

			// Token: 0x06001C57 RID: 7255 RVA: 0x000B6E04 File Offset: 0x000B5004
			public void Do()
			{
				for (int i = 0; i < this.arrayKey.Length; i++)
				{
					OCIChar ocichar = Studio.GetCtrlInfo(this.arrayKey[i]) as OCIChar;
					if (ocichar != null)
					{
						if (this.kind == 0)
						{
							ocichar.animeOptionParam1 = this.value;
						}
						else
						{
							ocichar.animeOptionParam2 = this.value;
						}
					}
				}
			}

			// Token: 0x06001C58 RID: 7256 RVA: 0x000B6E70 File Offset: 0x000B5070
			public void Redo()
			{
				this.Do();
			}

			// Token: 0x06001C59 RID: 7257 RVA: 0x000B6E78 File Offset: 0x000B5078
			public void Undo()
			{
				for (int i = 0; i < this.arrayKey.Length; i++)
				{
					OCIChar ocichar = Studio.GetCtrlInfo(this.arrayKey[i]) as OCIChar;
					if (ocichar != null)
					{
						if (this.kind == 0)
						{
							ocichar.animeOptionParam1 = this.oldvalue[i];
						}
						else
						{
							ocichar.animeOptionParam2 = this.oldvalue[i];
						}
					}
				}
			}

			// Token: 0x04001F69 RID: 8041
			private int[] arrayKey;

			// Token: 0x04001F6A RID: 8042
			private float value;

			// Token: 0x04001F6B RID: 8043
			private float[] oldvalue;

			// Token: 0x04001F6C RID: 8044
			private int kind;
		}
	}
}
